//
//  EXNavigationController.h
//  Exercise
//
//  Created by 羊谦 on 16/5/31.
//  Copyright © 2016年 NetEase-yangqian. All rights reserved.
//

#import <UIKit/UIKit.h>

UIKIT_EXTERN NSString *const HSNavigationPopedByGestureNotification;
UIKIT_EXTERN NSString *const HSNavigationPopedByGestureFromControllerKey;

@interface EXNavigationController : UINavigationController
/**
 *  设置delegate时可以用.delegate设置，但获取时一定要用-navigationDelegate方法获取，因为delegate在内部被hack了
 *  但以下方法未被实现，所以在外部设置delegate无法接受回调
 
 - (NSUInteger)navigationControllerSupportedInterfaceOrientations:(UINavigationController *)navigationController NS_AVAILABLE_IOS(7_0);
 - (UIInterfaceOrientation)navigationControllerPreferredInterfaceOrientationForPresentation:(UINavigationController *)navigationController NS_AVAILABLE_IOS(7_0);
 */
@property(nonatomic, assign) id<UINavigationControllerDelegate> delegate;

// 默认为NO，当为YES时会自动设置除了rootController以外的所有viewcontoller的hidesBottomBarWhenPushed为YES
@property(nonatomic, assign) BOOL showTabbarInRootViewOnly;

/**
 *  获取经由delegate属性设置的delegate
 *
 *  @return delegate
 */
- (id<UINavigationControllerDelegate>)navigationDelegate;

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated finished:(void (^)(void))finishedBlock;

@end